<%@ page language="java" import="java.util.*"
    contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.nj9you.wxpay.dao.Dao"%>
<%@ page import="com.nj9you.wxpay.model.Order"%>
<%@ page import="java.util.Map.Entry"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>公众号支付测试</title>
</head>
<body>
    <table align=center cellspacing="0" border="1">
        <%
            out.append("<tr>");
            out.append("<th>").append("平台订单号").append("</th>");
            out.append("<th>").append("商户订单号").append("</th>");
            out.append("<th>").append("创建时间").append("</th>");
            out.append("<th>").append("更新时间").append("</th>");
            out.append("<th>").append("状态").append("</th>");
            out.append("<th>").append("备注").append("</th>");
            out.append("</tr>");
            List<Order> list = Dao.getAllOrder();
            if (list != null && list.size() > 0) {
            for (Order order : list) {
                if (order.getPlatformOrderId() != null && order.getPlatformOrderId().trim() != ""
                        && order.getMerOrderId() != null && order.getMerOrderId().trim() != "") {
                    out.append("<tr>");
                    out.append("<td style='padding:0 0.5em;'>").append(order.getPlatformOrderId()).append("</td>");
                    out.append("<td style='padding:0 0.5em;'>").append(order.getMerOrderId()).append("</td>");
                    out.append("<td style='padding:0 0.5em;'>").append(order.getCreateTime()).append("</td>");
                    out.append("<td style='padding:0 0.5em;'>").append(order.getUpdateTime()).append("</td>");
                    out.append("<td style='padding:0 0.5em;'>").append(String.valueOf(order.getState())).append("</td>");
                    out.append("<td style='padding:0 0.5em;'>").append(order.getRemark()).append("</td>");
                    out.append("</tr>");
                }
            }
            }
        %>
    </table>
</body>
</html>